﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
{
    class Program
    {
        static void Main(string[] args)
        {
            using (MyEmptyModel nn = new MyEmptyModel())
            {
                MyEntity myEntity = new MyEntity() {
           
                    UserName = "中国",
                    Password = "123",
                    IsActived = true,
                    IsDeleted = false,
                    CreatedTime = DateTime.Now,
                    UpdatedTime = DateTime.Now,
                    Remarks = ""
                };
                nn.MyEntities.Add(myEntity);
                nn.SaveChanges();

                var ss = from a
                         in nn.MyEntities
                         select a;
                foreach(var item in ss)
                {
                    Console.WriteLine($"id:{item.Id},UserName:{item.UserName},Password:{item.Password},Remarks:{item.Remarks}");
                }
                Console.Read();
            }
        }
    }
}
